/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "scaltblineinve")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Scaltblineinve.findAll", query = "SELECT s FROM Scaltblineinve s"),
    @NamedQuery(name = "Scaltblineinve.findByScaltblineinveid", query = "SELECT s FROM Scaltblineinve s WHERE s.scaltblineinveid = :scaltblineinveid"),
    @NamedQuery(name = "Scaltblineinve.findByNombre", query = "SELECT s FROM Scaltblineinve s WHERE s.nombre = :nombre"),
    @NamedQuery(name = "Scaltblineinve.findByObservaciones", query = "SELECT s FROM Scaltblineinve s WHERE s.observaciones = :observaciones")})
public class Scaltblineinve implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "scaltblineinveid")
    private Integer scaltblineinveid;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "nombre")
    private String nombre;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "observaciones")
    private String observaciones;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scaltblineinveid")
    private Collection<Scrvtbrepubrev> scrvtbrepubrevCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scaltblineinveid")
    private Collection<Scaltblinescu> scaltblinescuCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scaltblineinveid")
    private Collection<Sclbtblibros> sclbtblibrosCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scaltblineinveid")
    private Collection<Sciftbactplan> sciftbactplanCollection;
    @JoinColumn(name = "scaltbareainveid", referencedColumnName = "scaltbareainveid")
    @ManyToOne(optional = false)
    private Scaltbareainve scaltbareainveid;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scaltblineinveid")
    private Collection<Sciftbactinfdo> sciftbactinfdoCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scaltblineinveid")
    private Collection<Pydgtbproyec> pydgtbproyecCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scaltblineinveid")
    private Collection<Sciftbytacttec> sciftbytacttecCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scaltblineinveid")
    private Collection<Sctstbtesis> sctstbtesisCollection;

    public Scaltblineinve() {
    }

    public Scaltblineinve(Integer scaltblineinveid) {
        this.scaltblineinveid = scaltblineinveid;
    }

    public Scaltblineinve(Integer scaltblineinveid, String nombre, String observaciones) {
        this.scaltblineinveid = scaltblineinveid;
        this.nombre = nombre;
        this.observaciones = observaciones;
    }

    public Integer getScaltblineinveid() {
        return scaltblineinveid;
    }

    public void setScaltblineinveid(Integer scaltblineinveid) {
        this.scaltblineinveid = scaltblineinveid;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getObservaciones() {
        return observaciones;
    }

    public void setObservaciones(String observaciones) {
        this.observaciones = observaciones;
    }

    @XmlTransient
    public Collection<Scrvtbrepubrev> getScrvtbrepubrevCollection() {
        return scrvtbrepubrevCollection;
    }

    public void setScrvtbrepubrevCollection(Collection<Scrvtbrepubrev> scrvtbrepubrevCollection) {
        this.scrvtbrepubrevCollection = scrvtbrepubrevCollection;
    }

    @XmlTransient
    public Collection<Scaltblinescu> getScaltblinescuCollection() {
        return scaltblinescuCollection;
    }

    public void setScaltblinescuCollection(Collection<Scaltblinescu> scaltblinescuCollection) {
        this.scaltblinescuCollection = scaltblinescuCollection;
    }

    @XmlTransient
    public Collection<Sclbtblibros> getSclbtblibrosCollection() {
        return sclbtblibrosCollection;
    }

    public void setSclbtblibrosCollection(Collection<Sclbtblibros> sclbtblibrosCollection) {
        this.sclbtblibrosCollection = sclbtblibrosCollection;
    }

    @XmlTransient
    public Collection<Sciftbactplan> getSciftbactplanCollection() {
        return sciftbactplanCollection;
    }

    public void setSciftbactplanCollection(Collection<Sciftbactplan> sciftbactplanCollection) {
        this.sciftbactplanCollection = sciftbactplanCollection;
    }

    public Scaltbareainve getScaltbareainveid() {
        return scaltbareainveid;
    }

    public void setScaltbareainveid(Scaltbareainve scaltbareainveid) {
        this.scaltbareainveid = scaltbareainveid;
    }

    @XmlTransient
    public Collection<Sciftbactinfdo> getSciftbactinfdoCollection() {
        return sciftbactinfdoCollection;
    }

    public void setSciftbactinfdoCollection(Collection<Sciftbactinfdo> sciftbactinfdoCollection) {
        this.sciftbactinfdoCollection = sciftbactinfdoCollection;
    }

    @XmlTransient
    public Collection<Pydgtbproyec> getPydgtbproyecCollection() {
        return pydgtbproyecCollection;
    }

    public void setPydgtbproyecCollection(Collection<Pydgtbproyec> pydgtbproyecCollection) {
        this.pydgtbproyecCollection = pydgtbproyecCollection;
    }

    @XmlTransient
    public Collection<Sciftbytacttec> getSciftbytacttecCollection() {
        return sciftbytacttecCollection;
    }

    public void setSciftbytacttecCollection(Collection<Sciftbytacttec> sciftbytacttecCollection) {
        this.sciftbytacttecCollection = sciftbytacttecCollection;
    }

    @XmlTransient
    public Collection<Sctstbtesis> getSctstbtesisCollection() {
        return sctstbtesisCollection;
    }

    public void setSctstbtesisCollection(Collection<Sctstbtesis> sctstbtesisCollection) {
        this.sctstbtesisCollection = sctstbtesisCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (scaltblineinveid != null ? scaltblineinveid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Scaltblineinve)) {
            return false;
        }
        Scaltblineinve other = (Scaltblineinve) object;
        if ((this.scaltblineinveid == null && other.scaltblineinveid != null) || (this.scaltblineinveid != null && !this.scaltblineinveid.equals(other.scaltblineinveid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Scaltblineinve[ scaltblineinveid=" + scaltblineinveid + " ]";
    }
    
}
